package com.jackrain.nea.fc.pos.mapper;

import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;

/**
 * @author wuwenxue
 * @date 2018/05/18
 **/
@Mapper
public interface ViewDLRetailMapper {


    @Select("SELECT COUNT(1) FROM DL_B_RETAIL WHERE BILL_NO=#{billno}")
    int selectReatilCount(@Param("billno") String billno);


    @Select("SELECT ID,ENAME FROM DL_C_PAYMENT WHERE ECODE=#{ecode}")
    HashMap selPaymentID(String ecode);

    @Select("SELECT STATUS,ACCEPTE_STATUS FROM DL_B_RETAIL WHERE ID=#{id}")
    JSONObject selIsStatus(Long id);

    @Select("SELECT ID FROM DL_B_RETAIL WHERE BILL_NO=#{billno}")
    Long selectObjidByBillNo(@Param("billno") String billno);
}
